package hrm.action.factory;

import hrm.action.Action;
import hrm.action.ActionFactory;
import hrm.action.popup.BeforePopCodeListAction;
import hrm.action.popup.BeforePopEmployeeListAction;
import hrm.action.popup.BeforePopZipcodeListAction;
import hrm.action.popup.PopCodeListAction;
import hrm.action.popup.PopEmployeeListAction;
import hrm.action.popup.PopZipcodeListAction;


public class PopupActionFactory implements ActionFactory {
	private static PopupActionFactory factory;
	
	public static PopupActionFactory getInstance(){
		if(factory==null){
			factory=new PopupActionFactory();
		}
		return factory;
	}

	public Action getAction(String command){
		Action action=null;
		if(command.equalsIgnoreCase("bfzipcode")){
			action = new BeforePopZipcodeListAction();
		}else if(command.equalsIgnoreCase("zipcode")){
			action = new PopZipcodeListAction();
		}else if(command.equalsIgnoreCase("bfpopemplyoee")){
			action = new BeforePopEmployeeListAction();
		}else if(command.equalsIgnoreCase("popemployee")){
			action = new PopEmployeeListAction();
		}else if(command.equalsIgnoreCase("bfcode")){
			action = new BeforePopCodeListAction();
		}else if(command.equalsIgnoreCase("codelist")){
			action = new PopCodeListAction();
		}
		return action;
	}//
}